from data_structures.linked_list.positional_list import PositionalList
class A(PositionalList):

    def move_to_front(self, p):
        node = self._validate(p)
        if node != self._header.next:
            # remove node from existing location
            node.prev.next = node.next
            node.next.prev = node.prev
            # make node point to its new neighbors
            node.prev = self._header
            node.next = self._header.next
            # make new neighbors point to the node
            node.prev.next = node
            node.next.prev = node

